﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using OnlineMealOrdering.Models;
using OnlineMealOrdering.Persistence;

namespace OnlineMealOrdering.Controllers
{
    public class OnlineStoreController : Controller
    {
        public ActionResult OnlineStore(int id = 0)
        {
            using (var ctx = new OnlineStoreDomainContext())
            {
                if (id > 0)
                {
                    var model = StoreOnlineModel.GetStoreOnline(id);                    
                    return View(model);
                }
                return View();
            }
        }

        public ActionResult GetOnlineStore(int id)
        {
            using (var ctx = new OnlineStoreDomainContext())
            {
                var model = StoreOnlineModel.GetStoreOnline(id);
                return View(model);
            }
        }
                

    }
}
